<?php

function smarty_function_test( $params, Smarty &$smarty )
{
	$_r = '';
	$is = null;
	$value = null;
	$echo = null;
	
	$attributes = array( );
	foreach( $params as $_k => $_v )
	if( strpos( ',is,value,echo', $_k ) !== false )
	{
		if( strlen( $_v ) ) $$_k = $_v;
	}
	else
	{
		$attributes[ $_k ] = $_v;
	}
	
	if( !is_null( $is ) )
	{
	switch( $is )
	{
	case 'owner':
	$_r = ( $value == visitor::__getMe() ->getUserId() ) ? $echo : '';
	break;
	}
	} else {
		$_r = "<p><b>$is</b> $echo</p>";
	}
	
	return $_r;
}



?>